package jeons.review.biz.impl;

import java.util.List;

import jeons.review.biz.ReviewReplyBiz;
import jeons.review.dto.ReviewReplyDTO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class ReviewReplyBizImpl extends SqlMapClientDaoSupport implements ReviewReplyBiz{
	@Autowired SqlMapClientTemplate sqlMapClientTemplate;
	
	
	@Override
	public ReviewReplyDTO insertData(ReviewReplyDTO replyDTO) {
		sqlMapClientTemplate.insert("reviewReply.insert", replyDTO);
		System.out.println(" i m p l");
		System.out.println("replyDTO.getRe_reno() : "+replyDTO.getRe_reno());
		return replyDTO;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ReviewReplyDTO> getList(int reno) {
		return sqlMapClientTemplate.queryForList("reviewReply.getList", reno);
	}

	@Override
	public void deleteData(int re_reno) {
		sqlMapClientTemplate.delete("reviewReply.deleteData", re_reno);
		
	}

	@Override
	public void updateData(int re_reno) {
		sqlMapClientTemplate.update("reviewReply.updateData", re_reno);
		
	}

	@Override
	public void deleteALLData(int reno) {
		sqlMapClientTemplate.delete("reviewReply.deleteALLData", reno);
		
	}

}
